package com.bwie.mq;

import com.bwie.pojo.Store;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 生产者推送消息
 */
@Component
public class MessageProducer {

    @Autowired
    private AmqpTemplate amqpTemplate ;

    public void sendToMsg(Store store){
        amqpTemplate.convertAndSend("2301a",store);
    }
}
